package org.clever.sharding.jdbc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.clever.sharding.jdbc.entity.UserRole;
import org.springframework.stereotype.Repository;

/**
 * 作者： lzw<br/>
 * 创建时间：2018-11-05 15:29 <br/>
 */
@Repository
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    @Select("INSERT INTO `user_role`(`username`, `role_name`) VALUES (#{userRole.username}, #{userRole.roleName})")
    Integer insertBySelect(@Param("userRole") UserRole userRole);

    void insertBySelect2(@Param("userRole") UserRole userRole);

    void nativeSql(@Param("userRole") UserRole userRole);
}
